/**
 * @description 商品结算接口
 * @author 骆子豪
 * @date 2025-07-22
 */

import request from '@/utils/request'

/**
 * @description 获取商品结算列表
 */
export const fetchGoodsSettle = (data) => {
  return request({
    url: '/dealer/pzPointsSettlementM/getPzMemberOrderDListForSettlementByDealerId',
    method: 'post',
    data,
  })
}

/**
 * @description 生成结算申请单
 */
export const generateSettlement = (data) => {
  return request({
    url: '/dealer/pzPointsSettlementM/newPzPointsSettlementM',
    method: 'post',
    data,
  })
}

/**
 * @description 提交结算申请单
 */
export const submitSettlement = (data) => {
  return request({
    url: '/dealer/pzPointsSettlementM/savePzPointsSettlementM',
    method: 'post',
    data,
  })
}

/**
 * @description 获取历史结算单
 */
export const getHistorySettlement = (data) => {
  return request({
    url: '/dealer/pzPointsSettlementM/getPzPointsSettlementMPageListBySelf',
    method: 'post',
    data,
  })
}
